"ext-xml": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
- "oojs/oojs-ui": "0.19.1",
+ "oojs/oojs-ui": "0.19.2",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.2",
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:31Z
+ * Date: 2017-02-14T22:47:20Z
*/
( function ( OO ) {
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:35Z
+ * Date: 2017-02-14T22:47:25Z
*/
.oo-ui-element-hidden {
display: none !important;
box-sizing: border-box;
min-height: 3.125em;
}
+.oo-ui-floatableElement {
+ position: absolute;
+}
.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-iconElement.oo-ui-iconElement-icon {
background-size: contain;
}
.oo-ui-popupWidget {
position: absolute;
- /* @noflip */
left: 0;
}
.oo-ui-popupWidget-popup {
.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor {
display: block;
position: absolute;
- /* `top` property is to be set in theme's selector due to specific `@size-anchor` values
- /* @noflip */
+ /* `top` property is to be set in theme's selector due to specific `@size-anchor` values */
left: 0;
background-repeat: no-repeat;
}
cursor: auto;
}
.oo-ui-popupWidget.oo-ui-popupButtonWidget-frameless-popup {
- /* @noflip */
margin-left: 0.9375em;
}
.oo-ui-popupWidget.oo-ui-popupButtonWidget-framed-popup {
- /* @noflip */
margin-left: 1.2375em;
}
.oo-ui-inputWidget {
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:35Z
+ * Date: 2017-02-14T22:47:25Z
*/
.oo-ui-element-hidden {
display: none !important;
box-sizing: border-box;
min-height: 3.125em;
}
+.oo-ui-floatableElement {
+ position: absolute;
+}
.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-iconElement.oo-ui-iconElement-icon {
background-size: contain;
}
.oo-ui-popupWidget {
position: absolute;
- /* @noflip */
left: 0;
}
.oo-ui-popupWidget-popup {
.oo-ui-popupWidget-anchored .oo-ui-popupWidget-anchor {
display: block;
position: absolute;
- /* `top` property is to be set in theme's selector due to specific `@size-anchor` values
- /* @noflip */
+ /* `top` property is to be set in theme's selector due to specific `@size-anchor` values */
left: 0;
background-repeat: no-repeat;
}
cursor: auto;
}
.oo-ui-popupWidget.oo-ui-popupButtonWidget-frameless-popup {
- /* @noflip */
margin-left: 0.9375em;
}
.oo-ui-popupWidget.oo-ui-popupButtonWidget-framed-popup {
- /* @noflip */
margin-left: 1.5em;
}
.oo-ui-inputWidget {
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:31Z
+ * Date: 2017-02-14T22:47:20Z
*/
( function ( OO ) {
// Initialization
if ( this.input instanceof OO.ui.InputWidget ) {
- this.$element.attr( 'for', this.input.getInputId() );
+ if ( this.input.getInputId() ) {
+ this.$element.attr( 'for', this.input.getInputId() );
+ }
}
this.$element.addClass( 'oo-ui-labelWidget' );
};
this.$floatableClosestScrollable = null;
}
- this.$floatable.css( { left: '', top: '' } );
+ this.$floatable.css( { left: '', right: '', top: '' } );
}
}
}
pos = OO.ui.Element.static.getRelativePosition( this.$floatableContainer, this.$floatable.offsetParent() );
-
// Position under container
pos.top += this.$floatableContainer.height();
+ // In LTR, we position from the left, and pos.left is already set
+ // In RTL, we position from the right instead.
+ if ( this.$floatableContainer.css( 'direction' ) === 'rtl' ) {
+ pos.right = this.$floatable.offsetParent().width() - pos.left - this.$floatableContainer.outerWidth();
+ delete pos.left;
+ }
this.$floatable.css( pos );
// We updated the position, so re-evaluate the clipping state.
clipHeight = allotedHeight < naturalHeight;
if ( clipWidth ) {
+ // The order matters here. If overflow is not set first, Chrome displays bogus scrollbars. (T157672)
+ // Forcing a reflow is a smaller workaround than calling reconsiderScrollbars() for this case.
+ this.$clippable.css( 'overflowX', 'scroll' );
+ void this.$clippable[ 0 ].offsetHeight; // Force reflow
this.$clippable.css( {
- overflowX: 'scroll',
width: Math.max( 0, allotedWidth ),
maxWidth: ''
} );
} );
}
if ( clipHeight ) {
+ // The order matters here. If overflow is not set first, Chrome displays bogus scrollbars. (T157672)
+ // Forcing a reflow is a smaller workaround than calling reconsiderScrollbars() for this case.
+ this.$clippable.css( 'overflowY', 'scroll' );
+ void this.$clippable[ 0 ].offsetHeight; // Force reflow
this.$clippable.css( {
- overflowY: 'scroll',
height: Math.max( 0, allotedHeight ),
maxHeight: ''
} );
*/
OO.ui.PopupWidget.prototype.updateDimensions = function ( transition ) {
var popupOffset, originOffset, containerLeft, containerWidth, containerRight,
- popupLeft, popupRight, overlapLeft, overlapRight, anchorWidth,
- align = this.align,
+ popupLeft, popupRight, overlapLeft, overlapRight, anchorWidth, direction,
+ dirFactor, align,
+ alignMap = {
+ ltr: {
+ 'force-left': 'backwards',
+ 'force-right': 'forwards'
+ },
+ rtl: {
+ 'force-left': 'forwards',
+ 'force-right': 'backwards'
+ }
+ },
widget = this;
if ( !this.$container ) {
// Lazy-initialize $container if not specified in constructor
this.$container = $( this.getClosestScrollableElementContainer() );
}
+ direction = this.$container.css( 'direction' );
+ dirFactor = direction === 'rtl' ? -1 : 1;
+ align = alignMap[ direction ][ this.align ] || this.align;
// Set height and width before measuring things, since it might cause our measurements
// to change (e.g. due to scrollbars appearing or disappearing)
height: this.height !== null ? this.height : 'auto'
} );
- // If we are in RTL, we need to flip the alignment, unless it is center
- if ( align === 'forwards' || align === 'backwards' ) {
- if ( this.$container.css( 'direction' ) === 'rtl' ) {
- align = ( { forwards: 'force-left', backwards: 'force-right' } )[ this.align ];
- } else {
- align = ( { forwards: 'force-right', backwards: 'force-left' } )[ this.align ];
- }
-
- }
-
// Compute initial popupOffset based on alignment
- popupOffset = this.width * ( { 'force-left': -1, center: -0.5, 'force-right': 0 } )[ align ];
+ popupOffset = this.width * ( { backwards: -1, center: -0.5, forwards: 0 } )[ align ];
// Figure out if this will cause the popup to go beyond the edge of the container
originOffset = this.$element.offset().left;
containerLeft = this.$container.offset().left;
containerWidth = this.$container.innerWidth();
containerRight = containerLeft + containerWidth;
- popupLeft = popupOffset - this.containerPadding;
- popupRight = popupOffset + this.containerPadding + this.width + this.containerPadding;
+ popupLeft = dirFactor * popupOffset - this.containerPadding;
+ popupRight = dirFactor * popupOffset + this.containerPadding + this.width + this.containerPadding;
overlapLeft = ( originOffset + popupLeft ) - containerLeft;
overlapRight = containerRight - ( originOffset + popupRight );
// Adjust offset to make the popup not go beyond the edge, if needed
if ( overlapRight < 0 ) {
- popupOffset += overlapRight;
+ popupOffset += dirFactor * overlapRight;
} else if ( overlapLeft < 0 ) {
- popupOffset -= overlapLeft;
+ popupOffset -= dirFactor * overlapLeft;
}
// Adjust offset to avoid anchor being rendered too close to the edge
}
// Position body relative to anchor
- this.$popup.css( 'margin-left', popupOffset );
+ this.$popup.css( direction === 'rtl' ? 'margin-right' : 'margin-left', popupOffset );
if ( transition ) {
// Prevent transitioning after transition is complete
}
}
+ // Check browser validity and reject if it is invalid
+ if (
+ this.$input[ 0 ].checkValidity !== undefined &&
+ this.$input[ 0 ].checkValidity() === false
+ ) {
+ return rejectOrResolve( false );
+ }
+
+ // Run our checks if the browser thinks the field is valid
if ( this.validate instanceof Function ) {
result = this.validate( this.getValue() );
if ( result && $.isFunction( result.promise ) ) {
// Initialization
if ( fieldWidget.constructor.static.supportsSimpleLabel ) {
- this.$label.attr( 'for', this.fieldWidget.getInputId() );
+ if ( this.fieldWidget.getInputId() ) {
+ this.$label.attr( 'for', this.fieldWidget.getInputId() );
+ }
}
this.$element
.addClass( 'oo-ui-fieldLayout' )
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:31Z
+ * Date: 2017-02-14T22:47:20Z
*/
( function ( OO ) {
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:35Z
+ * Date: 2017-02-14T22:47:25Z
*/
.oo-ui-popupTool .oo-ui-popupWidget-popup,
.oo-ui-popupTool .oo-ui-popupWidget-anchor {
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:35Z
+ * Date: 2017-02-14T22:47:25Z
*/
.oo-ui-tool.oo-ui-widget-enabled {
-webkit-transition: background-color 100ms;
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:31Z
+ * Date: 2017-02-14T22:47:20Z
*/
( function ( OO ) {
this.active = !!state;
if ( this.active ) {
this.$element.addClass( 'oo-ui-tool-active' );
- this.setFlags( 'progressive' );
+ this.setFlags( { progressive: true } );
} else {
this.$element.removeClass( 'oo-ui-tool-active' );
- this.clearFlags();
+ this.setFlags( { progressive: false } );
}
};
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:35Z
+ * Date: 2017-02-14T22:47:25Z
*/
.oo-ui-draggableElement-handle,
.oo-ui-draggableElement-handle.oo-ui-widget {
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:35Z
+ * Date: 2017-02-14T22:47:25Z
*/
.oo-ui-draggableElement-handle,
.oo-ui-draggableElement-handle.oo-ui-widget {
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:31Z
+ * Date: 2017-02-14T22:47:20Z
*/
( function ( OO ) {
OO.ui.OutlineOptionWidget.prototype.setPressed = function ( state ) {
OO.ui.OutlineOptionWidget.parent.prototype.setPressed.call( this, state );
if ( this.pressed ) {
- this.setFlags( 'progressive' );
+ this.setFlags( { progressive: true } );
} else if ( !this.selected ) {
- this.clearFlags();
+ this.setFlags( { progressive: false } );
}
return this;
};
OO.ui.OutlineOptionWidget.prototype.setSelected = function ( state ) {
OO.ui.OutlineOptionWidget.parent.prototype.setSelected.call( this, state );
if ( this.selected ) {
- this.setFlags( 'progressive' );
+ this.setFlags( { progressive: true } );
} else {
- this.clearFlags();
+ this.setFlags( { progressive: false } );
}
return this;
};
OO.mixinClass( OO.ui.CapsuleMultiselectWidget, OO.ui.mixin.IndicatorElement );
OO.mixinClass( OO.ui.CapsuleMultiselectWidget, OO.ui.mixin.IconElement );
+/* Static Properties */
+
+OO.ui.CapsuleMultiselectWidget.static.supportsSimpleLabel = true;
+
/* Events */
/**
return new OO.ui.CapsuleItemWidget( { data: data, label: label } );
};
+/**
+ * Get the widget's input's id, or generate one, if it has an input.
+ *
+ * @return {string}
+ */
+OO.ui.CapsuleMultiselectWidget.prototype.getInputId = function () {
+ var id;
+ if ( !this.$input ) {
+ return false;
+ }
+
+ id = this.$input.attr( 'id' );
+ if ( id === undefined ) {
+ id = OO.ui.generateElementId();
+ this.$input.attr( 'id', id );
+ }
+
+ return id;
+};
+
/**
* Get the data of the items in the capsule
*
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:35Z
+ * Date: 2017-02-14T22:47:25Z
*/
.oo-ui-actionWidget.oo-ui-pendingElement-pending {
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:35Z
+ * Date: 2017-02-14T22:47:25Z
*/
.oo-ui-window {
background: transparent;
/*!
- * OOjs UI v0.19.1
+ * OOjs UI v0.19.2
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-02-08T00:38:31Z
+ * Date: 2017-02-14T22:47:20Z
*/
( function ( OO ) {
// Events
this.actions.connect( this, {
click: 'onActionClick',
- resize: 'onActionResize',
change: 'onActionsChange'
} );
}
};
-/**
- * Handle action resized events.
- *
- * @private
- * @param {OO.ui.ActionWidget} action Action that was resized
- */
-OO.ui.Dialog.prototype.onActionResize = function () {
- // Override in subclass
-};
-
/**
* Handle action click events.
*
return this;
};
-/**
- * @inheritdoc
- */
-OO.ui.MessageDialog.prototype.onActionResize = function ( action ) {
- this.fitActions();
- return OO.ui.MessageDialog.parent.prototype.onActionResize.call( this, action );
-};
-
/**
* Handle window resized events.
*
this.executeAction( this.currentAction );
};
-/**
- * @inheritdoc
- */
-OO.ui.ProcessDialog.prototype.onActionResize = function ( action ) {
- if ( this.actions.isSpecial( action ) ) {
- this.fitLabel();
- }
- return OO.ui.ProcessDialog.parent.prototype.onActionResize.call( this, action );
-};
-
/**
* @inheritdoc
*/
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M12 8c-5 0-11 6-11 6s6 6 11 6 11-6 11-6-6-6-11-6zm0 10c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"/>
- <circle cx="12" cy="14" r="2"/>
+ <path id="sclera" d="M12 6C7 6 1 12 1 12s6 6 11 6 11-6 11-6-6-6-11-6zm0 10c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"/>
+ <circle id="pupil" r="2" cy="12" cx="12"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="#fff">
- <path d="M12 8c-5 0-11 6-11 6s6 6 11 6 11-6 11-6-6-6-11-6zm0 10c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"/>
- <circle cx="12" cy="14" r="2"/>
+ <path id="sclera" d="M12 6C7 6 1 12 1 12s6 6 11 6 11-6 11-6-6-6-11-6zm0 10c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"/>
+ <circle id="pupil" r="2" cy="12" cx="12"/>
</g></svg>
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="#36c">
- <path d="M12 8c-5 0-11 6-11 6s6 6 11 6 11-6 11-6-6-6-11-6zm0 10c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"/>
- <circle cx="12" cy="14" r="2"/>
+ <path id="sclera" d="M12 6C7 6 1 12 1 12s6 6 11 6 11-6 11-6-6-6-11-6zm0 10c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"/>
+ <circle id="pupil" r="2" cy="12" cx="12"/>
</g></svg>
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M12 8c-5 0-11 6-11 6s6 6 11 6 11-6 11-6-6-6-11-6zm0 10c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"/>
- <circle cx="12" cy="14" r="2"/>
+ <path id="sclera" d="M12 6C7 6 1 12 1 12s6 6 11 6 11-6 11-6-6-6-11-6zm0 10c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"/>
+ <circle id="pupil" r="2" cy="12" cx="12"/>
</svg>